/*
 * @Date: 2024-10-22 16:49:59
 * @Author: LiSong
 * @LastEditors: LiSong
 * @LastEditTime: 2024-10-30 09:06:10
 * @Description: 工作流状态类
 */
export class WfTask {
  constructor (value, label, alias) {
    this.value = value
    this.label = label
    this.alias = alias || ''
  }

  static get SEND () {
    return new WfTask(1, '送审', '')
  }
  
  static get SUBMIT () {
    return new WfTask(1, '提交', '')
  }

  static get AUDIT () {
    return new WfTask(2, '审核', '上报')
  }

  static get CANCEL () {
    return new WfTask(3, '撤销')
  }

  static get BACK () {
    return new WfTask(4, '退回')
  }

  equals (param) {
    if (param instanceof WfTask) {
      return param.value === this.value
    } else {
      return param === this.value
    }
  }
}

export default WfTask
